#include "Folder.h"

Folder::Folder(QDomElement folderElement)
{
    //set the name member
    Name = folderElement.attributeNode("Name").value();
    //iterate over each child element
    QDomNodeList childNodes = folderElement.childNodes();
    for(int i = 0; i < childNodes.count(); i++)
    {
        //create element version of node
        QDomElement actionNode = childNodes.at(i).toElement();
        //get the element's name
        QString actionName = actionNode.tagName();
        //determine action type
        if(actionName == "Card")
            Actions.push_back(*(new Card(actionNode)));
    }
}

Folder::~Folder()
{

}
